home *** CD-ROM | disk | FTP | other *** search
- Path: informatik.tu-muenchen.de!fischerj
- From: fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Fastest way to clear a Window?
- Date: 21 Feb 1996 02:27:54 GMT
- Organization: Technische Universitaet Muenchen, Germany
- Distribution: world
- Message-ID: <4gdvva$mtb@sunsystem5.informatik.tu-muenchen.de>
- References: <4fck5b$7mm@leofric.coventry.ac.uk> <oj6zqanjdm6.fsf@hpsrk.fc.hp.com>
- NNTP-Posting-Host: hphalle5.informatik.tu-muenchen.de
- X-Newsreader: TIN [version 1.2 PL2]
-
- Steve Koren (koren@hpsrk.fc.hp.com) wrote:
-
- : sschaem@teleport.com (Stephan Schaem) wrote:
-
- : > .. REPEAT 64
- : > move.l d0,(a0)+
- : > ENDR
- : > loop ..
-
- Hey people, still searching for a mega-clearwin-loop ?
- This one is the fastest ever known on AGA:
-
- loop:
- move.l d0,(a0)+
- dbra d7,loop
-
- this is no joke!
-
- max store speed is 8 cycles (14MHz). on A4000/040 it is even more.
-
- 8 cycles, that means 6 free cycles on 020 (free as long as you don't
- do another mem-acess). 6 cycles is sufficient to do the dbra.
-
- I'm always very amused to see those REPEAT movem megaroutines for
- chipmem clear :)
-
- : >
- : > For layered window you want the os to call you for each cliped region
- : > and do a 3 pass clear... 32bit masked left/right side, then simple move
- : > for the the middle. The OS probably use the blitter and use a A/B/D mode for
-
- : No, no, no, no, no.
-
- hehe, this hot chokolate is yummi ;)
-
- : The problem here is that if you clear a window by writing data to its
- : bitmap, when running on a graphics card you'll be shoving all that
- : (redundant) data over the Z-III bus. This is incredibly inefficient,
-
- ah sorry, you didn't talk about chipmem ?
- well, people, are you sure you can poke into the bitmap of a
- gfx-screen directly ? I was told this is illegal. Means if it works
- on your board, it maybe won't work on your friends...
-
- what about a gfx-lib call ? It will clean also partially hidden
- windows, and if your gfx-card got a blitter, wroooom!
-
- I hope this will do it:
-
- gfx.lib call: ClearScreen(window->rastport);
-
- Well, the name is puzzling but docs say it works on a rastport.
- Works on V1.2, too ;)
-
- : when the graphics card has onboard hardware that can clear a region much
- : faster than you ever could, if you just ask it to nicely.
-
- : This sort of programming leads to behaviors such as the painfully slow
- : LW4.0 Layout refresh speed on graphics cards, compared to say Vertex
- : which is easily 20X as fast. LW4.0 is practically unusable because of
- : this.
-
- : Use the gfx.library functions. They're there for a reason.
-
- Not always, but this time.
-
- : - steve
- ------------------------------------------------------------------------
- fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer) =:)
-
-
-
-